Notice: The information in this Technical Note can now be found in Inside Macintosh:Memory pages 1-71. This note will be removed from the Technical Note library in the near future.

MoveHHi and SetResPurge (TechNote ME 5)

ME 5 - MoveHHi and SetResPurge

Memory M.ME.MoveHHiSetResPurge

Revised by: March 1988 Written by: Jim Friedlander March 1987

SetResPurge(TRUE) is called to make the Memory Manager call the Resource Manager before purging a block specified by a handle. If the handle is a handle to a resource, and its resChanged bit is set, the resource data will be written out (using WriteResource).

When MoveHHi is called, even though the handle's block is not actually being purged, the resource data specified by the handle will be written out. An application can prevent this by calling SetResPurge(FALSE) before calling MoveHHi (and then calling SetResPurge(TRUE) after the MoveHHi call).

Further Reference: